package com.itgungnir.designpattern.prototype;

import java.util.ArrayList;
import java.util.List;

public class Test {
	public static void main(String[] args) {
		List<Shape> shapeList = new ArrayList<>();

		ShapeCache cache = new ShapeCache();
		shapeList.add(cache.getShape("triangle"));
		shapeList.add(cache.getShape("circle"));
		shapeList.add(cache.getShape("rectangle"));
		shapeList.add(cache.getShape("circle"));
		shapeList.add(cache.getShape("rectangle"));
		shapeList.add(cache.getShape("triangle"));
		shapeList.add(cache.getShape("rectangle"));
		shapeList.add(cache.getShape("circle"));

		for (Shape shape : shapeList) {
			shape.introduce();
		}
	}
}